<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');


Route::group(['namespace' => 'Admin'], function () {
    Route::group(['prefix' => 'admin'], function () {
        Route::get('/', 'HomeController@index')->name('admin/home');

        //会员
        Route::get('/user', 'UserController@index')->name('user/home');
        Route::post('/user/list', 'UserController@getList')->name('user/getList');

        //角色
        Route::get('/user/role', 'RoleController@index')->name('user/role');
        Route::post('/user/role/list', 'RoleController@getList')->name('user/role/list');
        Route::post('/user/role/add', 'RoleController@add')->name('user/role/add');
        Route::post('/user/role/edit', 'RoleController@edit')->name('user/role/edit');
        Route::post('/user/role/delete', 'RoleController@delete')->name('user/role/delete');
        //权限
    });
});
